#include <stdlib.h>
#include <cmath>
#include <iostream>
using namespace std;

#define DTOR(x)            (x*M_PI/180.0)
#define TROD(x)            (x*180.0/M_PI)
#define GENES                20
#define A                       2.5
#define B                       5.0
#define z                       30.0

double sinu20(double X[]) {
    double prod1 = 1.0;
    double prod2 = 1.0;

    for (int i = 0; i < GENES; i++) {
        prod1 *= sin(DTOR(X[i] - z));
        prod2 *= sin(DTOR(B * (X[i] - z)));
    }

    return -(A * prod1 + prod2);
}

int main(int argc, char** argv) {
    double X[20];
    for (int i = 0; i < GENES; i++)
        X[i] = 90;
    cout << "sinu20(raiz) = " << sinu20(X) << endl;

    return (EXIT_SUCCESS);
}
